#!/bin/sh -e

export DESTDIR="$1"
export LD=ld.bfd

# Disable usage of execinfo on the testsuite
clsed '/#ifndef G_OS_WIN32/c#if !defined(G_OS_WIN32) && defined(__GLIBC__)' \
    testsuite/reftests/gtk-reftest.c

cl-meson \
    -Dgtk_doc=false \
    -Dwayland-backend=true \
    -Dwin32-backend=false \
    -Dx11-backend=false \
    -Dintrospection=disabled \
    -Dmedia-gstreamer=disabled \
    -Dprint-cups=disabled \
    -Ddemos=false \
    -Df16c=disabled \
    -Dbuild-tests=false \
    -Dbuild-examples=false \
    -Dvulkan=disabled \
    . output

ninja -C output
ninja -C output install
